import request from "@/apps/admin/units/request"
import {HttpResultPaging} from "@/types/project";

/**
 * api
 * 获取后台全部菜单
 */
export const getAdministerMenuApi = (): Promise<HttpResultPaging<any>> => request(`/administer-menu/data`)


/**
 * 更改菜单状态
 * @param id
 * @param status
 */
export const changeStatusApi = (id: number | Array<number>, status: any): Promise<HttpResultPaging<any>> => request(`/administer-menu/status`, {id, status}, 'POST')


/**
 * 创建菜单接口
 */
export const CreatedMenuApi: string = `/administer-menu/created`


/**
 * 编辑菜单接口
 */
export const UpdatedMenuApi: string = `/administer-menu/updated`



/**
 * 删除后台菜单接口
 * @param id
 */
export const RemoveMenuApi = (id: number | Array<number>): Promise<HttpResultPaging<any>> => request(`/administer-menu/remove`, {id}, 'POST')